Add MA0184: Report interpolated strings without parameters#984
Merged
Conversation
…ters Co-authored-by: meziantou <509220+meziantou@users.noreply.github.com>
Co-authored-by: meziantou <509220+meziantou@users.noreply.github.com>
Co-authored-by: meziantou <509220+meziantou@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add diagnostic for interpolated string without parameters
Add MA0184: Report interpolated strings without parameters
Feb 1, 2026
meziantou
reviewed
Feb 1, 2026
| @@ -0,0 +1,257 @@ | |||
| using Meziantou.Analyzer.Rules; | |||
Owner
There was a problem hiding this comment.
@copilot Can you add test with raw strings
_ = [|$"""
Sample
"""|];
Contributor
Author
There was a problem hiding this comment.
Added test for raw interpolated strings in commit ada289b. The fixer now properly handles both regular and raw interpolated strings by preserving the raw string format when removing the $ prefix.
Co-authored-by: meziantou <509220+meziantou@users.noreply.github.com>
Owner
|
@copilot On older version of Roslyn 3.8, 4.2, the following test fails: |
Owner
|
@copilot The documentation is no up to date. Can you regenerate it? |
Co-authored-by: meziantou <509220+meziantou@users.noreply.github.com>
Contributor
Author
Co-authored-by: meziantou <509220+meziantou@users.noreply.github.com>
Contributor
Author
Owner
|
…th CSHARP10_OR_GREATER Co-authored-by: meziantou <509220+meziantou@users.noreply.github.com>
Contributor
Author
This was referenced May 2, 2026
Closed
Merged
Closed
Closed
Closed
Closed
Closed
This was referenced May 12, 2026
Closed
Closed
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.